package com.zeny.online.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.zeny.online.util.SpringUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @ClassName WebConfig
 * @Description TODO
 * @Author zeny
 * @Date 2020/5/3 0003 18:12
 */
@EnableTransactionManagement
@Configuration
@MapperScan(basePackages = "com.zeny.online.mapper")
public class WebConfig {

    /**
     * 分页插件
     * @return
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        return paginationInterceptor;
    }


    @Bean
    public SpringUtil getSpringUtil() {
        return new SpringUtil();
    }
}
